﻿using System;
using System.Collections.Generic;
using InvestmentIntelligence.DbModel.Models;

namespace InvestmentIntelligence.Data.Repository.Comparers.EntityModelsComparers
{
    public class FundBookEntitySerieComparer : IEqualityComparer<FundBookEntitySerie>
    {
        public bool Equals(FundBookEntitySerie x, FundBookEntitySerie y)
        {
            return x.FundBookEntityId==y.FundBookEntityId && x.Date.Date == y.Date.Date;
        }



        public int GetHashCode(FundBookEntitySerie obj)
        {
            unchecked
            {
                return obj == null ? 0 : obj.FundBookEntityId * 397 ^ obj.Date.Date.GetHashCode();
            }
            
        }
    }
}